package codej.ast;

import static codej.ast.Option.*;
import codej.ast.*;

public class NextExpression extends AbstractNode {

	private final String op;
	private final Expression nextExpression;

	public void accept(Visitor visitor) {
		visitor.visit(this);
	}

	public NextExpression(String op, Expression nextExpression) {
		this.op = op;
		this.nextExpression = nextExpression;
	}

	public String getOperator() {
		return op;
	}

	public Expression getNextExpression() {
		return option(nextExpression, new Expression());
	}

}
